<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Survival of passengers on the Titanic</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body>

<table width="100%" summary="page for Titanic"><tr><td>Titanic</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Survival of passengers on the Titanic</h2>

<h3>Description</h3>

<p>This data set provides information on the fate of passengers on the
fatal maiden voyage of the ocean liner &lsquo;Titanic&rsquo;, summarized according
to economic status (class), sex, age and survival.
</p>


<h3>Usage</h3>

<pre>Titanic</pre>


<h3>Format</h3>

<p>A 4-dimensional array resulting from cross-tabulating 2201
observations on 4 variables.  The variables and their levels are as
follows:
</p>

<table summary="Rd table">
<tr>
 <td style="text-align: right;">
    No </td><td style="text-align: left;"> Name </td><td style="text-align: left;"> Levels</td>
</tr>
<tr>
 <td style="text-align: right;">
    1 </td><td style="text-align: left;"> Class </td><td style="text-align: left;"> 1st, 2nd, 3rd, Crew</td>
</tr>
<tr>
 <td style="text-align: right;">
    2 </td><td style="text-align: left;"> Sex </td><td style="text-align: left;"> Male, Female</td>
</tr>
<tr>
 <td style="text-align: right;">
    3 </td><td style="text-align: left;"> Age </td><td style="text-align: left;"> Child, Adult</td>
</tr>
<tr>
 <td style="text-align: right;">
    4 </td><td style="text-align: left;"> Survived </td><td style="text-align: left;"> No, Yes
  </td>
</tr>

</table>



<h3>Details</h3>

<p>The sinking of the Titanic is a famous event, and new books are still
being published about it.  Many well-known facts&mdash;from the
proportions of first-class passengers to the &lsquo;women and
children first&rsquo; policy, and the fact that that policy was not
entirely successful in saving the women and children in the third
class&mdash;are reflected in the survival rates for various classes of
passenger.
</p>
<p>These data were originally collected by the British Board of Trade in
their investigation of the sinking.  Note that there is not complete
agreement among primary sources as to the exact numbers on board,
rescued, or lost.
</p>
<p>Due in particular to the very successful film &lsquo;Titanic&rsquo;, the last
years saw a rise in public interest in the Titanic.  Very detailed
data about the passengers is now available on the Internet, at sites
such as <em>Encyclopedia Titanica</em>
(<a href="https://www.encyclopedia-titanica.org/">https://www.encyclopedia-titanica.org/</a>).
</p>


<h3>Source</h3>

<p>Dawson, Robert J. MacG. (1995),
The &lsquo;Unusual Episode&rsquo; Data Revisited.
<em>Journal of Statistics Education</em>, <b>3</b>.
doi: <a href="https://doi.org/10.1080/10691898.1995.11910499">10.1080/10691898.1995.11910499</a>.
</p>
<p>The source provides a data set recording class, sex, age, and survival
status for each person on board of the Titanic, and is based on data
originally collected by the British Board of Trade and reprinted in:
</p>
<p>British Board of Trade (1990),
<em>Report on the Loss of the &lsquo;Titanic&rsquo; (S.S.)</em>.
British Board of Trade Inquiry Report (reprint).
Gloucester, UK: Allan Sutton Publishing.
</p>


<h3>Examples</h3>

<pre>
require(graphics)
mosaicplot(Titanic, main = "Survival on the Titanic")
## Higher survival rates in children?
apply(Titanic, c(3, 4), sum)
## Higher survival rates in females?
apply(Titanic, c(2, 4), sum)
## Use loglm() in package 'MASS' for further analysis ...
</pre>


</body></html>
